/* 
 * Template Name: 星云放映 (Nebula Projection)
 * CSS Prefix: np-
 * Colors: Deep purple #1A0033, Pink #FF6B9D, Dark #0d0015, Light purple #D4B5FF
 */

:root {
    --np-bg-dark: #0d0015;
    --np-purple-deep: #1A0033;
    --np-pink: #FF6B9D;
    --np-purple-light: #D4B5FF;
    --np-text-main: #e0d0ff;
    --np-glow: rgba(255, 107, 157, 0.5);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body.np-body-starry {
    background-color: var(--np-bg-dark);
    color: var(--np-text-main);
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    line-height: 1.6;
    position: relative;
    min-height: 40vh; max-height: 60vh;
    overflow-x: hidden;
}

/* Starry Background */
.np-stars-bg {
    position: sticky; top: 0;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at bottom, #1B2735 0%, #090A0F 100%);
    z-index: -1;
    opacity: 0.8;
}
.np-stars-bg::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(2px 2px at 20px 30px, #eee, rgba(0,0,0,0)),
        radial-gradient(2px 2px at 40px 70px, #fff, rgba(0,0,0,0)),
        radial-gradient(2px 2px at 50px 160px, #ddd, rgba(0,0,0,0)),
        radial-gradient(2px 2px at 90px 40px, #fff, rgba(0,0,0,0)),
        radial-gradient(2px 2px at 130px 80px, #fff, rgba(0,0,0,0)),
        radial-gradient(2px 2px at 160px 120px, #ddd, rgba(0,0,0,0));
    background-repeat: repeat;
    background-size: 200px 200px;
    animation: np-twinkle 4s infinite;
}

@keyframes np-twinkle {
    0% { opacity: 0.5; }
    50% { opacity: 1; }
    100% { opacity: 0.5; }
}

/* Typography */
a {
    color: var(--np-purple-light);
    text-decoration: none;
    transition: all 0.3s ease;
}
a:hover {
    color: var(--np-pink);
    text-shadow: 0 0 8px var(--np-glow);
}

.np-gradient-text {
    background: linear-gradient(45deg, var(--np-purple-light), var(--np-pink));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
}

/* Glow Card Animation */
.np-glow-card {
    background: rgba(26, 0, 51, 0.6);
    border: 1px solid rgba(212, 181, 255, 0.2);
    border-radius: 12px;
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
    backdrop-filter: blur(5px);
}
.np-glow-card::before {
    content: '';
    position: absolute;
    top: -2px; left: -2px; right: -2px; bottom: -2px;
    background: linear-gradient(45deg, transparent, var(--np-pink), transparent, var(--np-purple-light));
    z-index: -1;
    opacity: 0;
    transition: opacity 0.4s ease;
    border-radius: 14px;
    animation: np-border-dance 3s linear infinite;
}
.np-glow-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.5), 0 0 15px var(--np-glow);
}
.np-glow-card:hover::before {
    opacity: 1;
}

@keyframes np-border-dance {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Layout */
.np-main-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header & Nav */
.np-header {
    background: rgba(13, 0, 21, 0.8);
    border-bottom: 1px solid rgba(255, 107, 157, 0.3);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
}
.np-nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
}
.np-nav-left, .np-nav-right {
    display: flex;
    gap: 20px;
}
.np-nav-item {
    font-size: 16px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.np-logo-wrapper {
    flex-shrink: 0;
}
.np-logo-img {
    max-height: 60px;
    filter: drop-shadow(0 0 10px var(--np-glow));
}
.np-search-box {
    max-width: 400px;
    margin: 15px auto 0;
    text-align: center;
}
.np-search-form {
    display: flex;
    border-radius: 30px;
    overflow: hidden;
    border: 1px solid var(--np-purple-light);
}
.np-search-input {
    flex: 1;
    padding: 10px 20px;
    background: rgba(26, 0, 51, 0.5);
    border: none;
    color: #fff;
    outline: none;
}
.np-search-btn {
    padding: 10px 25px;
    background: linear-gradient(45deg, var(--np-purple-deep), var(--np-pink));
    border: none;
    color: #fff;
    cursor: pointer;
    font-weight: bold;
}

/* Index Grid Layout (Asymmetrical) */
.np-index-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(4, 150px);
    gap: 20px;
    margin-bottom: 40px;
}
.np-grid-center {
    grid-column: 2 / 4;
    grid-row: 2 / 4;
}
.np-grid-top {
    grid-column: 2 / 4;
    grid-row: 1 / 2;
    display: flex;
    gap: 20px;
}
.np-grid-bottom {
    grid-column: 2 / 4;
    grid-row: 4 / 5;
    display: flex;
    gap: 20px;
}
.np-grid-left {
    grid-column: 1 / 2;
    grid-row: 1 / 5;
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.np-grid-right {
    grid-column: 4 / 5;
    grid-row: 1 / 5;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.np-featured-link {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
}
.np-featured-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
}
.np-featured-info {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px;
    background: linear-gradient(to top, rgba(13,0,21,0.9), transparent);
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
}

.np-small-card {
    flex: 1;
    display: block;
    position: relative;
    height: 100%;
}
.np-small-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
}
.np-card-title {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 10px;
    background: rgba(0,0,0,0.7);
    text-align: center;
    font-size: 14px;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
}

/* Content with Sidebar */
.np-content-with-sidebar {
    display: flex;
    gap: 30px;
}
.np-main-content {
    flex: 1;
}
.np-sidebar {
    width: 300px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* List Items */
.np-latest-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.np-list-item {
    display: flex;
    padding: 15px;
    gap: 15px;
}
.np-item-img-link {
    width: 160px;
    height: 90px;
    flex-shrink: 0;
}
.np-item-img-link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
}
.np-item-text h3 {
    margin-bottom: 5px;
    font-size: 18px;
}
.np-meta {
    font-size: 12px;
    color: #888;
    margin-bottom: 8px;
}
.np-desc {
    font-size: 14px;
    color: #bbb;
}

/* Sidebar Widgets */
.np-widget {
    padding: 20px;
}
.np-widget-title {
    margin-bottom: 15px;
    font-size: 18px;
    border-bottom: 1px solid rgba(212, 181, 255, 0.2);
    padding-bottom: 10px;
}
.np-hot-list {
    list-style: none;
}
.np-hot-item {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.np-hot-num {
    background: var(--np-pink);
    color: #fff;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
}
.np-random-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.np-random-item {
    display: flex;
    align-items: center;
    gap: 10px;
}
.np-random-img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
}
.np-category-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.np-cat-tag {
    padding: 5px 10px;
    background: rgba(212, 181, 255, 0.1);
    border-radius: 20px;
    font-size: 14px;
}
.np-cat-tag:hover {
    background: var(--np-pink);
    color: #fff;
}

/* 5-Column Compact Grid (List Page) */
.np-compact-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
    margin-top: 20px;
}
.np-grid-item {
    display: flex;
    flex-direction: column;
}
.np-grid-img-wrapper {
    width: 100%;
    aspect-ratio: 2/3;
}
.np-grid-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
}
.np-grid-title-wrapper {
    padding: 10px;
    text-align: center;
    background: rgba(0,0,0,0.5);
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
}
.np-grid-title {
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Show Page (Left 40% Right 60%) */
.np-show-article {
    padding: 30px;
    margin-top: 20px;
}
.np-show-flex {
    display: flex;
    gap: 40px;
}
.np-show-left {
    width: 40%;
    flex-shrink: 0;
}
.np-show-cover {
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 0 20px rgba(255, 107, 157, 0.3);
}
.np-show-right {
    width: 60%;
}
.np-show-title {
    font-size: 28px;
    margin-bottom: 15px;
}
.np-show-meta {
    display: flex;
    gap: 20px;
    color: #aaa;
    font-size: 14px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(212, 181, 255, 0.2);
}
.np-show-body {
    font-size: 16px;
    line-height: 1.8;
    margin-bottom: 30px;
}
.np-btn-play {
    padding: 15px 40px;
    background: linear-gradient(45deg, var(--np-pink), var(--np-purple-light));
    border: none;
    border-radius: 30px;
    color: #fff;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 0 15px var(--np-glow);
    transition: transform 0.3s ease;
}
.np-btn-play:hover {
    transform: scale(1.05);
}

/* Breadcrumb & Pagination */
.np-breadcrumb {
    padding: 15px 0;
    font-size: 14px;
    color: #aaa;
}
.np-pagination {
    margin: 40px 0;
    text-align: center;
}
.np-pagination a, .np-pagination span {
    display: inline-block;
    padding: 8px 15px;
    margin: 0 5px;
    background: rgba(26, 0, 51, 0.8);
    border: 1px solid var(--np-purple-light);
    border-radius: 4px;
}
.np-pagination .current {
    background: var(--np-pink);
    color: #fff;
    border-color: var(--np-pink);
}

/* Prev/Next */
.np-prev-next {
    display: flex;
    justify-content: space-between;
    margin: 30px 0;
    padding: 20px;
    background: rgba(26, 0, 51, 0.4);
    border-radius: 8px;
}

/* Footer */
.np-footer {
    background: rgba(13, 0, 21, 0.9);
    border-top: 1px solid rgba(212, 181, 255, 0.2);
    padding: 40px 0 20px;
    margin-top: 50px;
}
.np-footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
}
.np-flink-list, .np-domain-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin: 15px 0 30px;
}
.np-footer-contact {
    margin-bottom: 20px;
    color: #aaa;
}
.np-footer-copyright {
    color: #888;
    font-size: 14px;
}
.np-hidden-stats {
    display: none;
}

/* Responsive */
@media (max-width: 992px) {
    .np-index-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }
    .np-grid-center, .np-grid-top, .np-grid-bottom, .np-grid-left, .np-grid-right {
        grid-column: auto;
        grid-row: auto;
    }
    .np-content-with-sidebar {
        flex-direction: column;
    }
    .np-sidebar {
        width: 100%;
    }
    .np-compact-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .np-show-flex {
        flex-direction: column;
    }
    .np-show-left, .np-show-right {
        width: 100%;
    }
}
@media (max-width: 768px) {
    .np-nav-container {
        flex-direction: column;
        gap: 15px;
    }
    .np-compact-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}


/* ========== 差异化特效 ========== */
/*
 * ===================================================================
 * ## 星云放映 (np-) CSS 特效代码
 * ## 作者: Manus AI
 * ## 描述: 包含星云流动、星光闪烁、轨道旋转等动画，以及卡片、标题、按钮的交互效果。
 * ===================================================================
 */

/*
 * ------------------------------------------
 * 1. @keyframes 动画定义
 * ------------------------------------------
 */

/**
 * @keyframes np-nebula-flow
 * 星云流动效果：通过移动一个巨大的渐变背景来模拟流动的星云。
 * 应用于页面主背景或大型区块背景。
 */
@keyframes np-nebula-flow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/**
 * @keyframes np-star-twinkle
 * 星星闪烁效果：通过改变透明度和大小来模拟星星的自然闪烁。
 * 可应用于小的装饰性伪元素。
 */
@keyframes np-star-twinkle {
  0%, 100% { opacity: 0.7; transform: scale(1); }
  50% { opacity: 0.2; transform: scale(0.8); }
}

/**
 * @keyframes np-orbit
 * 轨道旋转效果：使一个小元素（如月亮或小行星）围绕一个中心点旋转。
 * 应用于装饰性元素。
 */
@keyframes np-orbit {
  from { transform: rotate(0deg) translateX(50px) rotate(0deg); }
  to { transform: rotate(360deg) translateX(50px) rotate(-360deg); }
}

/**
 * @keyframes np-shooting-star
 * 流星划过效果：一个细长的伪元素从左到右快速划过。
 * 应用于标题的hover效果。
 */
@keyframes np-shooting-star {
  0% { transform: translateX(-200%) skewX(-30deg); opacity: 0.8; }
  100% { transform: translateX(200%) skewX(-30deg); opacity: 0; }
}


/*
 * ------------------------------------------
 * 2. 交互式Hover和Transition效果
 * ------------------------------------------
 */

/**
 * .np-card: 影视卡片
 * 默认状态下有轻微的浮动感，hover时触发星尘边框和放大效果。
 */
.np-card {
  position: relative;
  overflow: hidden; /* 隐藏溢出的边框和伪元素 */
  transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.4s ease;
  border-radius: 8px;
}

.np-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  border: 2px solid transparent;
  background: conic-gradient(from var(--angle), #9d00ff, #ff00c1, #9d00ff) border-box;
  -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: destination-out;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
  animation: np-spin 4s linear infinite paused;
  --angle: 0deg;
}

@property --angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}

@keyframes np-spin {
  to {
    --angle: 360deg;
  }
}

.np-card:hover {
  transform: translateY(-10px) scale(1.03);
  box-shadow: 0 20px 40px rgba(255, 0, 193, 0.3);
}

.np-card:hover::before {
  opacity: 1;
  animation-play-state: running;
}

/**
 * .np-card img: 卡片内图片
 * hover时图片轻微变亮，增加视觉焦点。
 */
.np-card img {
  transition: filter 0.4s ease;
}

.np-card:hover img {
  filter: brightness(1.1);
}

/**
 * .np-title: 页面或区块标题
 * hover时触发流星划过效果。
 */
.np-title {
  position: relative;
  overflow: hidden;
  display: inline-block;
  padding-bottom: 5px; /* 为流星动画留出空间 */
}

.np-title::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 50px;
  height: 2px;
  background: linear-gradient(90deg, transparent, #f0f8ff, transparent);
  opacity: 0;
}

.np-title:hover::after {
  opacity: 1;
  animation: np-shooting-star 1s cubic-bezier(0.7, 0, 0.3, 1) forwards;
}

/**
 * .np-button: 通用按钮
 * hover时背景发光，文字颜色变化。
 */
.np-button {
  background-color: #9d00ff;
  color: #fff;
  padding: 12px 25px;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  position: relative;
  z-index: 1;
  transition: color 0.4s ease, transform 0.3s ease;
  overflow: hidden;
}

.np-button::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: #ff00c1;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.4s ease, height 0.4s ease;
  z-index: -1;
}

.np-button:hover {
  color: #f0f8ff;
  transform: scale(1.05);
}

.np-button:hover::before {
  width: 200%;
  height: 200%;
}

/**
 * a: 链接
 * hover时颜色渐变并添加发光效果。
 */
a.np-link {
  color: #f0f8ff;
  text-decoration: none;
  transition: color 0.3s ease, text-shadow 0.3s ease;
}

a.np-link:hover {
  color: #ff00c1;
  text-shadow: 0 0 10px rgba(255, 0, 193, 0.8);
}

/*
 * ------------------------------------------
 * 3. 将动画应用于特定元素
 * ------------------------------------------
 */

/**
 * .np-page-background: 页面主背景
 * 应用星云流动动画。
 */
.np-page-background {
  background: linear-gradient(270deg, #2c003e, #510051, #2c003e, #ff00c1);
  background-size: 400% 400%;
  animation: np-nebula-flow 30s ease infinite;
}

/**
 * .np-star: 装饰性星星元素
 * 应用星星闪烁动画，并随机化动画延迟，使其看起来更自然。
 */
.np-star {
  position: absolute;
  width: 2px;
  height: 2px;
  background: #f0f8ff;
  border-radius: 50%;
  animation: np-star-twinkle 3s infinite ease-in-out;
}

/**
 * .np-orbit-satellite: 轨道卫星装饰
 * 应用轨道旋转动画。
 */
.np-orbit-container {
    position: relative;
    width: 100px;
    height: 100px;
    /* border: 1px dashed rgba(255,255,255,0.2); /* 可选：显示轨道路径 */ */
    border-radius: 50%;
    margin: 20px;
}

.np-orbit-satellite {
    position: absolute;
    top: 50%;
    left: 0;
    width: 10px;
    height: 10px;
    background: #ff00c1;
    border-radius: 50%;
    transform-origin: 50px 0; /* 旋转中心点 */
    animation: np-orbit 10s linear infinite;
}
